import React from "react";
import styles from './button.module.css';

interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
    /**
     * 设置按钮大小
     */
    size?: 'small' | 'medium' | 'large';
    /**
     * Optional click handler
     */
    mode: 'primary' | 'secondary';
    /**
     * 点击按钮时的回调
     */
    onClick?: () => void;
}

/**
 * Primary UI component for user interaction
 */
export const Button = (
    {
        mode = 'primary',
        ...props
    }: ButtonProps) => {
    return (
        <button
            type="button"
            className={styles.Button}
            {...props}
        >
            {props.children}
        </button>
    );
};
